<script type="text/javascript" >
<?
$width = $pars['width'] ? $pars['width'] : 280;
$height = $pars['height'] ? $pars['height'] : 210;
?>
var focus_width=<?=$width?>;
var focus_height=<?=$height?>;
var text_height=20
var swf_height = focus_height+text_height
<?
$pics=array();
$links=array();
$texts=array();
foreach($lib_data as $key => $row){

	$pics[$key] = $row['_picture'];
	$links[$key] = $row['url'];
	$texts[$key] = $row['subject'];

}
	$pics = implode('|',$pics);
	$links = implode('|',$links);
	$texts = implode('|',$texts);
?>
var pics= '<?=$pics?>';
var links= '<?=$links?>';
var texts= '<?=$texts?>';


document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="../fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0/#version=6,0,0,0/default.htm/#version=6,0,0,0/#version=6,0,0,0/default.htm/default.htm" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="<?=$TPL['url']?>images/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#e1e1e1">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="<?=$TPL['url']?>images/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#e1e1e1" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="../www.macromedia.com/go/getflashplayer" />');
document.write('</object>');

</script>